#ifndef dgt_BeginEndControl_H
#define dgt_BeginEndControl_H
#include "wx/control.h"
#include <wx/wx.h>


//Class for dgt_BeginEndControl
class dgt_BeginEndControl: public wxControl
{
public:
	dgt_BeginEndControl(void);
	dgt_BeginEndControl(
		wxWindow*			parent, 
		wxWindowID			id,		
		//	const wxBitmap&		bitmap,	

		const wxPoint&		pos = wxDefaultPosition,
		const wxSize&		size = wxDefaultSize,
		long				style = wxTAB_TRAVERSAL | wxNO_BORDER,
		const wxValidator&	validator = wxDefaultValidator
		);
	~dgt_BeginEndControl( void ); 
	virtual wxSize		DoGetBestSize() const; //set the size of control
	void				AddText(wxString  string); //adding text
	void				SetEnable( bool c_enable = true );//setting control's parameters to the some state
	bool				GetEnable( void )  { return m_enableF; } //getting state of m_enable
	wxString				GetType (wxString type) {return type;};

protected:	

	void				OnLeftDown(wxMouseEvent& event);
	void				OnMove (wxMouseEvent &event);
	void				OnLeftUp (wxMouseEvent & event);
	void				OnDClick(wxMouseEvent& event);
	void				OnContextMenu (wxContextMenuEvent &event);
	void				OnDeleteClick(wxCommandEvent &event);
	void				OnPaint(wxPaintEvent& event);
	void				OnEraseBackground(wxEraseEvent& event);
	void				OnEnter(wxMouseEvent& event);
	void				OnLeave(wxMouseEvent& event);
private:
	int					m_x, m_y; //coordinates where window will  move
	bool				m_enableF;//flag, if window is enable
	bool				m_dragF;//flag, if window is chosen for dragging
	wxPoint				m_Point;//gets coordinates of mouse move
	bool				m_drag;
	bool				m_ldown;
	bool				m_enter;
	bool				m_bottom_marker;
	bool				m_top_marker;

	DECLARE_EVENT_TABLE()
};

/**********************************************************************************************/
#endif 

